package cn.ctodb.openapi.idcard.service.dto;


import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Objects;
import javax.persistence.Lob;

/**
 * A DTO for the DataIdcard entity.
 */
public class DataIdcardDTO implements Serializable {

    private Long id;

    @NotNull
    private String name;

    @NotNull
    private String cardno;

    private String sex;

    private String address;

    private String birthday;

    @Lob
    private String photo;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    public String getCardno() {
        return cardno;
    }

    public void setCardno(String cardno) {
        this.cardno = cardno;
    }
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }
    public String getBirthday() {
        return birthday;
    }

    public void setBirthday(String birthday) {
        this.birthday = birthday;
    }
    public String getPhoto() {
        return photo;
    }

    public void setPhoto(String photo) {
        this.photo = photo;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        DataIdcardDTO dataIdcardDTO = (DataIdcardDTO) o;

        if ( ! Objects.equals(id, dataIdcardDTO.id)) { return false; }

        return true;
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(id);
    }

    @Override
    public String toString() {
        return "DataIdcardDTO{" +
            "id=" + id +
            ", name='" + name + "'" +
            ", cardno='" + cardno + "'" +
            ", sex='" + sex + "'" +
            ", address='" + address + "'" +
            ", birthday='" + birthday + "'" +
            ", photo='" + photo + "'" +
            '}';
    }
}
